# Contributor: Rasmus Thomsen <oss@cogitri.dev>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=vo-aacenc
pkgver=0.1.3
pkgrel=3
pkgdesc="VisualOn AAC encoder from Android"
url="https://sourceforge.net/projects/opencore-amr/"
arch="all"
license="Apache-2.0"
subpackages="$pkgname-static $pkgname-dev"
source="https://netcologne.dl.sourceforge.net/project/opencore-amr/vo-aacenc/vo-aacenc-$pkgver.tar.gz"

prepare() {
	default_prepare

	update_config_sub
}

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="c8f00dfa758270ba9cad35dd6e24905dc7cf33d7717454b7c2c56c40dbf54f682450aa010a410a0350d70119d2aaa2e5ba4471b5bbe05ccec1f9d20ab3e57853  vo-aacenc-0.1.3.tar.gz"
